home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mlib / include / mscroll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-26  |  1.3 KB  |  42 lines

  1.  
  2. #ifndef __MSCROLL_H
  3. #define __MSCROLL_H
  4.  
  5. #define SCROLLUP             0x0110
  6. #define SCROLLDOWN           0x0111
  7. #define SCROLLRIGHT          0x0112
  8. #define SCROLLLEFT           0x0113
  9. #define SCROLLTO             0x0114
  10.  
  11. typedef enum {
  12.     Up,
  13.     Down,
  14.     Right,
  15.     Left
  16. } Direction;
  17.  
  18. class MScroller : public MWindow {
  19. protected:
  20.     VP                       World;
  21.     int                      vxpos;        // Coordinates of the window.
  22.     int                      vypos;
  23.     WORD                     speed;        // Number of pixels to shift by.
  24.     BOOL                     WrapX;
  25.     BOOL                     WrapY;
  26. public:
  27.                  MScroller (int x1, int y1, int x2, int y2,
  28.                     WORD AHandle, WORD AnHParent = HROOT);
  29.                  MScroller (const RECT& ABox,
  30.                     WORD AHandle, WORD AnHParent = HROOT);
  31.     virtual void             SetWindowPosition (int Newx, int Newy);
  32.     virtual void             ResizeWorld (WORD NewLength, WORD NewWidth);
  33.     virtual void             ResizeWorld (const RECT& NewWorld);
  34.     virtual void             LoadDirect (int fp);
  35.     virtual void             SaveDirect (int fp);
  36.     virtual void             Scroll (Direction where);
  37.     virtual void             SetSpeed (WORD NewSpeed);
  38.                 ~MScroller (void);
  39. };
  40.  
  41. #endif
  42.